#ifndef CALLSTACK_RECORDER_H_INCLUDED
#define CALLSTACK_RECORDER_H_INCLUDED

/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 counted_ptr.h

	$Header: /resource_editor/callstack_recorder.h $

	$NoKeywords: $

 ************************************************************************/

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifdef ENABLE_CALLSTACK_CODE

//define the preprocessor directive ENABLE_CALLSTACK_CODE to enable the callstack code
//if you want to resolve the function calls at runtime, you'll need to assoicate the application with a 
//PDB. Since PDBs path are hardcoded within an application, provide a common path for the PDBs which
//would be compatibale with the testers and yourself.

extern const char* do_record_callstack(int);

template <class T> void record_callstack(T *)
{
	return;
}

//use template specialziation to instrument the classes which you want to record call stack information for.
//must include the null parameter in the function definition, otherwise msvc++ will not correctly resolve the specialization.
////////////////////////////////////////////////////////////////////////////////////////////////////////////
class t_adventure_map;

extern void record_callstack<t_adventure_map>(t_adventure_map *);

#endif	//ENABLE_CALLSTACK_CODE

#endif	//CALLSTACK_RECORDER_H_INCLUDED


